package com.yorick.login.util;

import javax.servlet.http.HttpSession;
import java.util.Map;
import java.util.Objects;

/**
 * @program: vr_manage
 * @description: 登录的工具类
 * @author: 陈治杰
 * @create: 2021-08-07 12:35
 **/
public class Util {

    public static void saveMapToSession(HttpSession session, Map<String,Object> map){
        for (Map.Entry<String, Object> entry : map.entrySet()) {
            if(Objects.nonNull(entry.getValue())){
                session.setAttribute(entry.getKey(),entry.getValue());
            }
        }
    }
}
